import java.util.Arrays;
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {

//        Scanner sc = new Scanner(System.in);
//        int n = sc.nextInt();
//        fac3(n);
//        fac4(n);
//        fac5(n);

        int[] arr = {1, 2, 3};
        int[] arr2 = fac7(arr);
        System.out.println(Arrays.toString(arr));
        System.out.println(Arrays.toString(arr2));
    }

    public static int[] fac7(int[] arr){
        int[] arr2 = new int[arr.length];
        for(int i = 0; i < arr.length; i++){
            arr2[i] = arr[i]*2;
        }
        return arr2;
    }
    public static void fac6(int[] arr){
        for(int i = 0; i < arr.length; i++){
            arr[i] = arr[i]*2;
        }
    }
    public static void fac5(int n){
        if(n<10)
            System.out.print(n+" ");
        else{
            fac5(n/10);
            System.out.print(n%10+" ");
        }
    }
    public static void fac4(int n){
        if(n<10)
            System.out.print(n+" ");
        else{
            System.out.print(n%10+" ");
            fac4(n/10);
        }
    }
    public static void fac3(int n){
        if(n >9){
            fac3(n/10);
            System.out.print(n%10+" ");
        }
        else{
            System.out.print(n+" ");
        }
    }
}
